create bootstrapped & MI data sets - Number of data sets = nBoot*nImp
boot_imp <- bootImpute::bootMice(df, nBoot=100, nImp=5, seed=42) # use >= 1000 & 20
analyze and pool
# wrapper to analyze a data set
get_coefficients <- function(df) {
coef(lm(life_satisfaction ~ neuroticism + materialism + marital_status, df))}
fit_boot_mi <- bootImpute::bootImputeAnalyse(boot_imp, get_coefficients)
## Estimate Std. error 95% CI lower
## (Intercept) 30.34609707 1.21458193 27.9318816
## neuroticism -0.29922530 0.03408520 -0.3669206
## materialism -0.07741992 0.05035722 -0.1774608
## marital_statuscivil partnership 1.93145144 0.69844148 0.5435935
## marital_statusmarried 0.20961544 0.67871347 -1.1396123
## marital_statusother 0.87832362 1.04708233 -1.2026007
## 95% CI upper p
## (Intercept) 32.76031252 2.162110e-41
## neuroticism -0.23153003 8.406916e-14
## materialism 0.02262095 1.276937e-01
## marital_statuscivil partnership 3.31930939 6.916982e-03
## marital_statusmarried 1.55884320 7.581880e-01
## marital_statusother 2.95924789 4.038431e-01
For more information see e.g. Bartlett and Hughes (2020).